package ua.kpi.oblamskyiv.testcase.question;

import ua.kpi.oblamskyiv.counter.RangeCounter;
import ua.kpi.oblamskyiv.parser.SingleTextAnswerParser;
import ua.kpi.oblamskyiv.testcase.Answers;

public class RangeAnswerQuestion extends AbstractQuestion {
    private double maxDeviation;

    public RangeAnswerQuestion(String value, Answers correctAnswers, double maxDeviation) {
        super(value, correctAnswers, new RangeCounter(maxDeviation),
                new SingleTextAnswerParser());
        this.maxDeviation = maxDeviation;
    }

    @Override
    public String toString() {
        return super.toString() +
                String.format("(range: %f)", maxDeviation);
    }
}
